Conditional electric switch based on two power sources
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. A simple relay will suffice.

How it works:


If SRC2 is off then OUT is off.
If SRC2 is on the OUT will be SRC1.


You are looking for a relay. 


The coil voltage should match SRC2's voltage.
The contact voltage rating should be greater than or equal to SRC1 voltage.
The contact current rating should be greater than or equal to the load current and DC or AC as appropriate.