It's generally not confusing to most the obvious differences between a sandwich, a witch and the word "which", but are they related in any way?
Sandwich the food comes from sandwich the town (quite likely via the 4th Earl of Sandwich). Many English place names have -wich at the end, and some have the related -wick or -wych and a few used to have one and since lost it (Jorwic is now called York). It comes from the Old English wic meaning "place", "dwelling" or "bay", or the related Old Norse vic meaning the same thing (if named by Vikings). Further back it was a Germanic borrowing from vicus from which we have vicinity.
As the language changed the Old English rule that c following i or prior to i or e (but with some exceptions like ascian) was a /tʃ/ sound changed and so the later forms either became a /k/ or else the spelling changed to ch as that combination of letters is used for /tʃ/ in Middle and Modern English.
In some dialects you might perhaps still find wick as a word meaning "town" or "village" though it's probably completely obsolete on its own.
Witch is originally wicca (or wicce in the female form). Again the spelling changed to wicche and later witch to match the later spelling rules. While there is some debate about just what the etymology of wicca is going back prior to Old English, it is certainly quite separate from wic and vic.
Which comes from Old English hwilc. Since the difference between "w" and "wh" (in those days, "hw") words was much more distinct in Old English, that and the l would mean that it wouldn't even be seen as coincidentally similar in those days. Even today it sounds quite different in some accents.
Incidentally, there is also wych used of several types of tree (wych hazel, sometimes written witch hazel and wych elm). It's also from Old English (wice meaning supple or pliant, compare wicker) but also not connected to any of the above. (There is a theory of the etymology of wicca prior to Old English that would have them as distant cousins, but its not considered the most likely etymology).
But what about a witch? I'm guessing because the term is widely talked about in the bible, it is very old, and it most likely originated before the term sandwich.
Be careful about this as a guide. It is certainly true that the King James Version of the bible is a valuable resource for looking at Early Modern English, not every word in English of the time was used in it. (Later translations are pretty much useless in this regard). While sandwich as an item of food is no older than its invention in the 18th century, Sandwich the town is also from Old English and its -wich ending goes back to the very beginnings of the language.
Also you're incorrect in saying the term is widely talked about; there are ten uses of the word or related words like witchcraft.