The selective population of rotational, spin, and LAMBDA-doublet states of OH(2-PI,upsilon = 0,1) by inelastic collisions with H-2 and D2 is investigated in two experiments. In the first experiment OH radicals are generated by photolysis inside a pulsed nozzle beam source and prepared in the ground state j = 1.5, upsilon = 0, 2-PI-3/2 with equal amounts in both LAMBDA-doublets by rotational cooling in the subsequent expansion. The collisional excitation of OH by the secondary beam is probed via laser-induced fluorescence selectively for the LAMBDA-doublet states for the different rotational levels in both spin manifolds of upsilon = 0. Integral cross sections sigma(j = 1.5,OMEGABAR = 1.5 --> j',OMEGA'BAR,epsilon') averaged over the LAMBDA-doublet substates in the input channel, but LAMBDA-doublet substate resolved in the output channel are obtained in this case. In contrast to some previous predictions the PI(A') LAMBDA-doublet substate is preferentially populated. This implies a population inversion in the LAMBDA-doublets for 2-PI-1/2 and an anti-inversion for 2-PI-3/2, which rules out previously proposed pump mechanisms for astronomical OH masers. In the second experiment OH is generated also by photolysis, in this case however in a flow system. Single LAMBDA-doublet states are prepared by infrared excitation of the thermally relaxed OH in 2-PI-3/2, upsilon = 1 for two rotational states (j = 1.5,4.5). The redistribution in upsilon = 1 induced by collisions with H-2 is probed by laser-induced fluorescence. Rate constants are obtained for transitions from the initially prepared LAMBDA-doublet states to the other LAMBDA-doublet of the same j and also for transitions to other rotational states.