$game_self_switches[[GAMEMAP_ID, EVENT_ID, "A"]]
The "A" can obviously be the other letters as well. In fact, if you are doing it through a script, you can use th whole alphabet, or practically anything you can think for it. You can also check out the Self-Switch Debug menu I made for more examples.