Yes. While I would recommend a router, you can do it with a switch only by using ICS on the computer that is connected to the Internet and to the switch. ICS doesn't support everything (like instant messaging) but it will allow the other computers to get Internet access as long as that computer is turned on and not hibernating or sleeping or whatnot.
please tell me in detail.
internet an all pc are connected to the switch. Internet is not connected to a pc. Internet is also connected to switch.