Choose interpreter after script start e.g. if/else inside hashbang

Is there any way to dynamically choose the interpreter that’s executing a script? I have a script that I’m running on two different systems, and the interpreter I want to use is located in different locations on the two systems. What I end up having to to is change the hashbang line every time I switch over. I would like to do something that is the logical equivalent of this (I realize that this exact construct is impossible):