Source selection Circuit
This is a common requirement on telephone or wide area network equipment and servers.
The most straightforward way is just with a pair of diodes. No active devices required.
Solutions such as relays have the problem that there will be a power drop-out while switching over.
IC vendors such as Analog Devices have more sophisticated solutions that also support hot-plugging and avoid the voltage drop of diodes.