A vertical-cavity surface-emitting laser with two monolithically grown cavities is presented, The three-terminal device allows current injection into the active regions of both cavities, Under various injection conditions, the device lases continuous wave on either one of the two longitudinal modes supported by the cavity, or on both wavelengths simultaneously. By using a constant injection current in the bottom cavity, and adjusting the current in the top cavity, the device shows all four possible emission states. These are the off state, lasing at the short wavelength lambda (S), at the long wavelength lambda (L), and at both lambda (S) and lambda (L) at the same time.