A Schengen visa is valid for the whole area. In principle, if you are banned from one Schengen country, you should be banned from the whole area but a visa refusal is not a ban. Conversely, Switzerland can’t grant a visa valid only for Switzerland (outside of some very specific cases) but it should decide whether you can be trusted to enter the whole area. Formally, an application to the Swiss consulate is therefore not different from a new application to the German consulate. Each consulate would take previous refusals into account and should decide whether or not to grant a visa based on the same rules.
But don’t forget that a visa is granted for a specific trip and purpose. If you applied to Switzerland (and presumably submitted an itinerary, perhaps an invitation, etc.) and show up somewhere else entirely, border guards could become suspicious. If you applied for a Swiss visa specifically with the intent to circumvent the German consulate’s decision, you would have committed fraud and could see your visa annulled (or even get a proper ban this time).
And German border guards are certainly empowered to examine all that even if Switzerland issued your visa. They are also likely to be more inquisitive than usual if you show up after several refusals with a visa from another country. So you need to be especially careful to stick to your itinerary and to have all the documentation (tickets, bookings, invitation, anything about the purpose of your trip, your employment, etc.) at hand when crossing the border.
On the other hand, there is nothing automatic about this process. If Switzerland really is your main destination and you merely want to transit at a German airport (thus entering Germany first), it should not be a problem.
A valid Schengen visa legally allows you to attempt entry to any Schengen-agreement member country (including Germany). That does not mean that the German (or any other) border agents must grant you entry — they could question and possibly refuse you for many reasons, but with a valid visa it seems unlikely unless you’re on some watchlist. This is not legal advice, but if questioned, I presume having proof of onward travel or accommodation in Switzerland could help.
However, if you’re holding a Swiss national visa (non-Schengen), it might not be valid for entry to Germany. Look at the first “valid for” line on your visa to see if it says “Schengen states” or only “Switzerland”.
Credit:stackoverflow.com‘