Upvote:0
You can, if your visa is valid for the Schengen zone and not just for Germany (it will say on the top of the visa).
If you have such a visa, you are free to travel within the Schengen zone (of which Switzerland is a member). Upon exit from Switzerland, your passport will be stamped as you will be leaving the Schengen area.
Upvote:6
Switzerland – while not part of the European Union – belongs to the Schengen area so you don't need anything else than a Schengen visa. You won't even leave the Schengen area (or, in all likelihood, see any border guard) before leaving Zurich.