and the user is using an older SDL2 what will happen?
What will always happen: your program will fail to load. Like this, for example: ./a.out: symbol lookup error: ./a.out: undefined symbol: SDL_wcscasecmp
What do you want to happen? If you want to call the new function when it’s available, but ignore it (or use a workaround) when it’s not, then use late binding for that function. That is, call SDL_LoadObject() to load the shared object and SDL_LoadFunction() to get a pointer to that function, if it exists.
That would require the end-user to compile the application from source. I assume the OP wants to build and distribute a binary, hence the run-time solution.