Re-program the Arduino Uno without losing a base (custom firmware) sketch

Could be - but when you download a sketch, the entire memory is rewritten.

So perhaps the better question would have been:
How do I read 2 input pins and decide which of 4 programs will run?
Or perhaps, how do I set a value using #IFDEF and select one of 4 code sets to run?