Make a button to control both AC and 12V DC light
To paraphrase your question:

When the button is pressed a light should turn on. If mains is available the AC light should turn on. Otherwise the DC backup lamp should turn on. When the button is released the light(s) should turn off.




simulate this circuit &ndash; Schematic created using CircuitLab
Figure 1. A mains light priority lighting circuit.
How it works:

Pressing SW1, a two-pole switch, will connect LAMP1 to the AC supply. It will also connect the LED lamp, D1, to the DC supply for a moment.
If AC is present then RLY1 will be energised and D1 will turn off.
If AC is not present or is lost while the button is pressed then the LED lamp will turn on.

If your AC voltage is mains then this circuit can be dangerous. SW1 would have to be high quality with excellent separation between the two contacts with no chance of a short circuit between the contacts.
RLY1 would have an AC coil with a voltage rating to match the AC supply.