If i have 12 months min. contract duration with UPC which runs until mid May2021. Am i allowed to notify UPC on 31 March with 2 months notice to quit the contract on 31 May 2021?
Yes that should work. I think you can cancel it 2 months in advance. So if you cancel it before end of March, you should be good.
Terms and conditions: https://www.upc.ch/pdf/Footer/en/general-terms-and-conditions.pdf