Simple question but tricky

Sorry, I wasn't clear enough. The switch is already wired that way, I can't change anything. This switches "passive" electronics, the pins do not go to GPIO's, there are also no more free, so a software solution does not work, this needs a hardware solution.