Not sure if I understood you correctly.
So when player collides with red switch, you want to open the red door? On collision with blue switch, open blue door and so on?
Add "Color" instance variable to both Switch and Door sprites. Set correct Color for each switch and door ("red", "blue", "green" etc.)
Your code could look something like this:
Player on collision with Switch
Door compare instance variable Color=Switch.Color -> Door set isOpen=1
Door set animation to "Open"