It depends on what you are talking about and it's quite complex.
The state pension is not transferable between EU states i.e. if during your working life you work in more than one EU state and pay contributions into each states social security scheme then you get a proportionate pension from each state. The funds are not transferred between the countries.
The compulsory occupational pension cannot be paid in cash if the person is subject to the compulsory system in the new country but can be transferred to another scheme or placed into a blocked account in Switzerland (until retirement).
The occupational pension that exceeds the compulsory part can be paid out in cash if the person leave Switzerland as can the lump sum benefits (often based on pension contributions from bonuses or awards).
Simple it isn't, but luckily the Swiss Govt have produced an absolutely super document on it all and it's available in
English. Isn't that nice of them?