MV SelfSwitch based conditional branch

Is there any way to create something like "If Event 001, Map 10, SelfSwitch A is on" Then "Enable switch X"\"Set variable to Y"?
I didn't test it, but maybe you could try putting that on a conditional branch:
$gameSelfSwitches.value([mapId, eventId, SWITCH])

$gameSelfSwitches.value([10, 1, 'A']) - this will return true if the event 1 on map 10 has it's self switched A ON.

Original thread: https://forums.rpgmakerweb.com/threads/selfswitch-based-conditional-branch.127692/