What output power do you need to switch? A small solution for low power can be made with optocouplers:

The 'output' here is conducting when all input voltages are present. If one or more input voltage is missing, the associated optocoupler will be off and the output will be high-resistance (wired and function).
You'll have to design the capacitors and resistors such that the optocouplers do not turn off when during the zero crossing of the input voltage.
You may want to split the series resistors in 2 and place the capacitor in between to reduce the voltage level across the capacitor:

Ideally place a zener diode parallel to the capacitor to protect it from overvoltage.