If I am understanding your question correctly, then what you are trying to do is possible. The only caveat I will add to that is that it is dependant on the type of switch and how it works internally.
Check the picture I attached for a Schematic.
Kieran