I know that you can not withdraw money from the 2nd pillar for 3 years after buying-in, but at the same time Switzerland allows you to withdraw the whole Pillar 2 amount if you move abroad.
Do you know what happens if I buy-in in the 2nd pillar and then move abroad in a non-EU country the next year?
You will be retrospectively fully taxed, so that you are not able to benefit from the reduced tax rate usually applied for pension fund capital withdrawals.
That’s at least the legal perspective, reality sometimes differs.
I think in the case of moving out, this rule does not apply.
If moving to the EU/EFTA, you can only take out the non mandatory part as far as I remember.