For those interested, here's how I did it:
Instance variable "doorID" inside the door and "switchID" inside the switch.
Event:
Player: On collision with Switch
System: For each Door (This is important, otherwise, it won't work)
Switch: switchID = Door.doorID
Action:
set variable Door.open to True