Switch between 2 power sources
The most simple way of doing this is with two diodes, each one in series with each one of the voltage sources. The lower the forward voltage of the diodes, the better the solution. Since this is the case, the market also offers MOSFET based "active ORing diodes", like this one from TI

http://www.ti.com/product/lm5051