A voltage divider won't work, because it must draw more current than the load it has to feed. Lot of battery life wasted.
Now, what is exactly the question?
Is it how to switch two different voltages, or is it how do I produce 4V out of a 9V battery?
The former is simple, use a SPDT switch, the...