Well don't you just want to set different SASModes then?
Read the various control states in front of you, build the table of what you should do then code it. I.e., if main sas switch is set, and then there's a multi-select dial set to a specific mode, read the mode switches, then choose what to do. If you have different buttons for different modes, you'll have to read the master SAS state, and select it, perhaps toggling a hidden state variable in your MEGA about whether the next button push enables, or disables the master SAS mode. You might use encoding of a bit-field and read the field from another "sub-controller" on your board. And switching SAS modes with SAS disabled may make sense (like if you have a rotary switch control), or it may not make sense (if you just have buttons that may, or may not light up if the mode is chosen, and the mode is active). I.e. push prograde twice (once to switch from target to prograde, then from prograde to off).
As in any control system, it really does help to make a little table of what things should be first, otherwise debugging becomes a pain in the neck. I use whiteboards (easy to erase) or pencil (easy to refer to my sheet of paper). Without knowing exactly what you're up to I think you're just looking to set various nav ball modes based on the user's switches, but since we don't know exactly what switches you have, it's hard to guess at what's best for you.