you can sell the flat and use money to repay loan on new flat
2) you can claim benfit of long term capital gains as you held flat for more than 10 years
3) LTCG is exempt for an individual on sale of a residential house property, if such gains (not the whole consideration) is utilised to purchase or construct another residential house.
4) It should be noted that the new house should be purchased within one year before or two years after the date of transfer.
5) if you have purchased new flat one year before then on sale of flat you would get benefit of LCTG