How to switch between two digital signals?
You can use...


MUX (multiplexer). The selection inputs control which one of the inputs gets sent to the output. Simple.
Tri-state buffers. Connect the outputs together, and enable only one buffer at a time.
Analog switches... Well, they are switches, they will let the signal through when closed, quite self-explanatory
Junk parts solution with bipolar transistor used as common base switch 








simulate this circuit &ndash; Schematic created using CircuitLab