Your post is confusingly written, and i have 2 interpretations of the question you are trying to ask:
1. You are trying to connect a laptop and a switch to your tv at the same time.
2. You are trying to connect your switch to your laptop via a HDMI switcher.
Answers:
1. To do this you will need 3 HDMI kabels. On one side of the HDMI switcher you wil see multiple HDMI ports in a row, these are your inputs. plug your laptop and your switch into these. on another side you will see 1 other HDMI port. plug your tv into this one. you may also need to plug a power source into another port, depending on your switch box.
2.The HDMI-port in your laptop is output only, meaning that you cannot use your laptop directly as a display for your Nintendo Switch. The best alternative would be to simply get a pc monitor, and use the build-in screen when using your Switch on the go.
Hope this helps!