Rakesh ji,
You can sell your 2nd house and can claim exemption u/s 54 provided it is a Long Term Asset.
Sec. 54 states:
In order to claim exemption u/s 54, you need to make investment in another residential house property 1 year before or 2 years after the sale in case of purchase or within 3 years in case of construction.
The exemption will be lower of:
If the cost of the new house property OR LTCG
If the CG in the new property is could not be fully or partly reinvested for the purposes specified in the said section then it should be deposited with the special bank under capital gain scheme account.