No, you'd lose that Swords Dance boost when you switch out. Those temporary boost only last while the Pokemon is in battle; they disappear if it switches out or the battle ends.
There is a way to carry boost over to another Pokemon though, and that's through the use of the move Baton Pass. If you have boost and then you use Baton Pass, whatever you switch into will have the same boosts (and also any other special things, like Stockpiles, Ingrain, etc.) Be careful though, it also passes on any stat drop you may have received.