We derive a theory for Bose condensation in nonequilibrium steady states of bosonic quantum gases that are coupled both to a thermal heat bath and to a pumped reservoir (or gain medium), while suffering from loss. Such a scenario describes photonic many-body systems such as exciton-polariton gases. Our analysis is based on a set of kinetic equations for a gas of noninteracting bosons. By identifying a dimensionless scaling parameter controlling the boson density, we derive a sharp criterion for which system states become selected to host a macroscopic occupation. We show that with increasing pump power, the system generically undergoes a sequence of nonequilibrum phase transitions. At each transition a state either becomes or ceases to be Bose selected (i.e. to host a condensate): The state which first acquires a condensate when the pumping exceeds a threshold is the one with the largest ratio of pumping to loss. This intuitive behavior resembles simple lasing. In the limit of strong pumping, the coupling to the heat bath becomes dominant so that eventually the ground state is selected, corresponding to equilibrium(-like) Bose condensation. For intermediate pumping strengths, several states become selected giving rise to fragmented nonequilibrium Bose condensation. We compare these predictions to experimental results obtained for excitons polaritons in a double-pillar structure [Phys. Rev. Lett. 108, 126403 (2012)] and find good agreement. Our theory, moreover, predicts that the reservoir occupation is clamped at a constant value whenever the system hosts an odd number of Bose condensates.