digital switch ? with arduino . how to do it

You have to be more precise. Yes, probably it's possible but what is the best/easiest method we can't tell. The "switch" might be a tiny switch on a remote or a massive 400V 3-phase switch. Both switches, both controllable from the Arduino but the solution is quite different...