Builder sold mortgaged flat

Hi I need your guidance, I have purchased a flat in Bangalore in Nov-2014, also processed loan with PNB housing Finance ltd which was disbursed in Feb-2015. PN Housing finance disbursed almost 100% loan to the builder in Feb-2015 itself as the flat was ready possession. I was taking follow-up with builder to process registration for my flat since Feb-2015, but with some unreasonable reasons builder delayed it. When I forced it too much that time (In Nov-2015) builder revealed that the flat which I purchased he has mortgaged for project loan. He morgaged it with City Union Bank Builder never shared this information before selling the flat and also went into agreement (Tripod agreement) with PNB housing and me for loan processing. Builder told in Nov-2015 that he will clear the mortgage by Mar-2016 and process registration, he has given written commitment for the same with his letter head and stamp. But so far not cleared the mortgage. Now City Union Bank has sent notice that they are going to take possession of my flat in due coarse of time. Could you please suggest whether I can file case in consumer court against builder for selling mortgage flat and not performing registration of my flat? Can I claim for any compensation? Regards Ashwini