Alternatives to a sliding switch and relay?
You can get small surface mount SPDT switches, such as this one by Texas Instruments. It is essentially just a 2:1 multiplexer.

However, it isn't quite that simple. You will need to find out a few more things about what will be required of the switch, such as how fast do you need it to switch, what current will be going through it, is it signal/power etc. 

Using a parametric search like the one on sites like Digikey can help you select the parameters that you need, and you can then look through the list of devices to see which ones will suit your needs. 

But to answer your question, yes. Such devices do indeed exist.