Automatic DC 3 line switch
Try searching for a single-pole-double-throw relay - you can activate the switch from a current i.e. the switch contact moves due to electromagnetism from a coil.

However, from your description I think you may also need a comparator circuit that "looks" at the voltage levels and activates the relay according to a rule. The rule is your required functionality but I'm not altogether clear as to what you want. I think you want to turn the output off when &lt; 1V is on input #2 else just let the other voltage through?

If I'm correct you'll also need a DC power supply (or maybe the 9V can power the circuit?).