You can use the eXclusive OR operator, ^, to toggle a single bit and leave the other bits as they were.
Code:
[VarSet, switch, 32]// 00100000
[If, ButtonPressed = 3, [VarSet, switch, (switch ^ 1)]]// switch - 00100001
[If, ButtonPressed = 4, [VarSet, switch, (switch ^ 2)]]// switch - 00100010
[If, ButtonPressed = 5, [VarSet, switch, (switch ^ 4)]]// switch - 00100100
[If, (switch & 1) = 1, [Note, "setting xxxx is On"]]
[If, (switch & 2) = 2, [Note, "setting xxxx is On"]]
[If, (switch & 4) = 4, [Note, "setting xxxx is On"]]