If you are planning this to consolidate the source into 1 set rather than 3. Would it not make sense to standardise the databases at the same time? Then, you can control what code runs on each site by use of a system flag of some kind, either an environment variable or flag in a control table. This would mean that all site specific code is determined at run time rather than compile time - which means you can turn functionality on and off without re-compiling.
e.g. site 1 suddenly has a new requirement that site 2 already uses. Rather than having to go through all your code, change the pre-processor statements to include the bits you now need for site 1, recompile and deploy to the customer...etc..etc..
You would simply connect to their database and change a flag.
Believe me, I know from experience, my way is much less painful in the long run.