Is There A Node Or Way To Do This?

I am working on a project and I thought of a node that would be very useful but I cant find something like it. I made a picture of something like it.

250011-unreal-variable-node.png

Basically, if if execution 1 is active, it will output through the execution output and the variable output would be whatever variable is plugged in to variable 1. If execution 2 is active, the same thing would happen except it would output whatever is plugged into variable 2 instead of variable 1. Is there a node similar to this or a substitution I can use? Thanks.

After some time I was able to make a function that did this

Functions cant have multiple execution points. Macros can, though.