I have a Swedish residence permit and a non-EU passport. Do I need a visa to travel to Switzerland? I am almost sure that I don't need it, but still would like someone here to confirm.
If you were a backpacker, how would you travel from Gothenburg to Zurich? I basically want to avoid taking flights so that I can see more of the countryside by bus or train.
You don't need a visa because both countries (and every country in-between if you are going by land) are in the Schengen area. In principle, you should not stay in Schengen countries (apart from Sweden) for more than 90 days in total in any 180-day period.
Regarding the second question, there are many possibilities, you will need to decide what's more important to you (convenience, time, price) and compare them yourself or ask a new question with more details. Train is doable (I know people who have done it!) but expensive and not particularly convenient, buses are cheaper, using ride sharing or hitchhiking (at least on part of the route, perhaps from Copenhagen or Hamburg) should be cheaper yet but that's all quite long compared to the plane.
Now, if you want to stop/visit things on the way, then none of this matters very much and train, bus or car could all be fine. You could also consider a ferry directly from Gothenburg to Kiel, go from Trelleborg to Travemünde or Rostock or take a ferry to Denmark and continue from there.