thanks for all i get the solution . it will be by adding one more wire from the switch to the lamp.
the lamp must be connected by four wires 2 line + neutral+ grounding
if i have emergency light with built in backup battery and connected to a separate emergency circuit when i switch off how it recognize that it is switching case not power failure