I doubt that such an approach would work, and it would be a real pain to maintain.
The problem you're hitting is not a new one, the classic examples are localisation and multi-platform applications.
The general solution is to have multiple target-specific source files or methods, and select the appropriate one to use at either compile or run time.
In the localisation example, there would be several language data files, one for "English", another "French", "Klingon" etc.
The appropriate file is then chosen at run time using some kind of user setting.
The same thing is done for multi-platform applications.
In the case of C/C++, usually using #ifdef ... #endif structures to enclose small call differences, or compiling using "win_stuff.cpp" as opposed to "linux_stuff.cpp" to select a platform-specific implementation of "stuff.h".
Take a look at the FSO source for examples!
PHP doesn't have a direct equivalent of #ifdef as it's an interpreted/JIT language, however you can get the same kind of effect using a straight if - then - else structure.
In your specific case, the very best way would be if there was some way for your plugin to determine the ExpressionEngine version automatically at runtime to pick the right call with no user intervention.
- Maybe APP_VER?
If that's not possible (or too difficult), then have a user-set config flag somewhere sensible so each user can manually set their ExpressionEngine version.