1)pay the amount under protest and get flat transferred in your name . if you dont pay society wont transfer flat in your name
2) move consumer forum against society for deficiency in service and seek refund of amount paid with protest .
3) you can in alternative issue legal notice to seller and ask him to pay the corpus amount . sale deed must be containing clause that seller will indemnify purchaser against any claim made by the society or any other authority