Best way to get 12 V from 28 V or 5 V ?

If the 12v is only needed to drive a single 150mA solenoid, just put a 100 ohm 3W (or greater) resistor in series with the solenoid so that you can run the combination from 28v directly. No need for a voltage regulator at all.