Digitally controlled switch IC - what's it called?

Folks

Hopefully a simple question. I'm designing a system with a single input. That input could be connected to a simple switch or it could be connected to a serial UART from another Arduino.

The switching will be manual, I don't need to auto-detect or anything but I want to control the switch with software.

I'm looking for the equivalent of a SPDT switch that's controlled by logic i.e. I can connect the control pin to another pin on my Arduino and if the pin is high, route the signal to one pin on the Arduino, if it's low, to another pin.

I assume these exist but I don't know what they're called. Any help?

thanks

Tommy

Answering my own question - it’s a multiplexer I’m after

For bidirectional or analog signals the device needed is an analog switch IC