Data source switch with simple logic level shift
Your circuit as is wouldn't work well for several reasons:


Your transistor base has no resistor
The output is driven only by diodes, so there is no way to pull the output low
You could add a pull-down on the output, but if the input pin to which the circuit connects has an internal pull-up resistor (which is likely for a UART RX), they will fight each other. Your 1k series resistor and pull-down resistor will also fight each other acting as a level shifter.
Even if you added a pull-down resistor on the output, when the switch pin is selecting the 3.3V input, the output will stay high if 5V data input is high, regardless of what the 3.3V input is doing.




You could always use an SN74LVC2G157DCUR.

These are dedicated 2:1 multiplexers with select line. You'll get better performance than trying to hook up a circuit with transistors and resistors. As they cost less than 40p in singles, they aren't going to break the bank.

The nice thing about them for your application is they also support down-translation. That means that if you run the IC from a 3.3V supply, the inputs remain 5V tolerant. So in your case you would make the connections:


3.3V Data In
5V Data In
N/C
GND
3.3V Data Out
Switch 5V
GND
3.3V Power


No need for any level shifting as the chip will do that itself.