You can buy premade commercial ones - costs seem to be $100+ but it would be easy for people to sell one for far less, so they may.
I'd look around for a hobbyist priced one.
Added :
MAX465 DIY version only some details - page stolen by an ad server.
These say Electronic but may not be.
Failing that :
You could use a mulipole relay. Probably a minimum 5 lines required to be switched. Qualit will probably be terroble with no care through OK with great care.
You can make an electronic one using ICs designed for this purpose - See Maxim IC related notes at end.
You could drive a mechanical KVM switch with a motor or solenoid.
This is a very Heath Robinson approach but should not be too hard and would work well. You can get slide switch and rotary switch KVMs (at least).
A slide switch one could be operated with
a solenoid,
a servo,
a nut on a threaded shaft driven by a motor,
a geared motor,
other ... .
A rotary switch one could use most of the above.
Hobby outlets sell ?Mamiya? geared motors with speeds as sow as a fraction of a turn per second. One of those could turn a knob very nicely.
MAX4885:
Premade -
Here's a premade Maxim evaluaton kit from Digikey about $40.
Seems to do exactly what you want.
or DIY
OR for $4 ish you can buy the IC from Dikikey and do it yourself - BUT TQFP pack - not a beginners ideal package.

MAX4885 datasheet
MAX 4885 product oage
- T h e M A X 4 8 8 5 i n t e g r a t e s h i g h - b a n d w i d t h a n a l o g
switches and level-translating buffers to implement a
complete 1:2 or 2:1 multiplexer for VGA signals. The
device provides switching for RGB, display data channel (DDC), and horizontal and vertical synchronization
(HSYNC, VSYNC) signals. A low-noise charge pump
with internal capacitors provides a boosted gate-drive
voltage to improve performance of the RGB switches.
In the 1:2 multiplexer mode, HSYNC/VSYNC inputs feature level-shifting buffers to support low-voltage CMOS
or standard TTL-compatible graphics controllers. In the
2 : 1 m u l t i p l e x e r m o d e , t h e o u t p u t b u f f e r s f o r t h e
HSYNC/VSYNC inputs are disabled, allowing bidirectional signaling. In both modes, DDC signals are voltage-clamped to an external voltage to provide level
translation and protection.
The MAX4885 features a
5µA shutdown mode and is ESD protected to ±8kV
Human Body Model (HBM) on externally routed pins.
The MAX4885 is specified over the extended (-40°C to
+85°C) temperature range, and is available in the 32-
pin, 5mm x 5mm TQFN package
http://datasheets.maxim-ic.com/en/ds/MAX4885EEVKIT.pdf
