Maybe you could put all the possible switches in a group (or use one of your existing groups), then loop through them in the “then” part of the rule until you find the one that matches your string value. Some examples of searching through the group are found here.