Circuit for power source selection

Something like this: