You cannot claim the benefit of exemption of Long Term Capital Gain by paying of your other flat loan, unless it was purchased 1 year prior to the date of Sale. If that was the case then you can claim the benefit.
Otherwise in order to save up on taxes you have to either buy a new property or invest your Capital Gains in Capital Gain Tax Saving Bonds within a period of 6 months from the date of sale upto a maximum of Rs. 50 Lacs.
Trust this clarifies your query.
Feel free to get back/ call back for any further clarifications.
Rohit R Sharma
BCOM, ACA, LLB - GEN, CERT. FAFP