The RS232 standard defines a negative voltage in the range of -3V to -15V as “1”, and a positive voltage in the range of +3V to +15V as “0”. The PC port usually use -10V and +10V levels.
RS422 use lower voltage, differencial (usually 3.3V or 5V).
A simple option would be to add a new COM port to your PC. There are inexpensive USB-to-Serial cables you can buy, so you could connect your two devices to the PC, and switch between them in software (by selecting different COM port in your PC software settings).
If you want to use your single PC port and build some switch, a simple option would be to use small low power relays. The attached schema is an example for COM port with cable that uses RX and TX signals only. If your devices require the other handshake signals as well (like DTR, RTS, etc.), you'll need to add more relays for them, and to connect the relay coils in parallel. Match the relay coil voltage to your available V+ DC power supply voltage.
You can use this circuit for RS422 as well, with different cable that supports RS422 signals.