HMRC will decide which property to treat as your main home based on the facts, unless you tell them which you nominate. This may affect the amount of Capital Gains Tax you have to pay.
If you have not made any nomination within specified period when you acquired the second property, then at best you could argue that 14 years of your stay in that property be treated as it being your main residence for capital gains purposes. You can only treat one property as main residence at any one point.
If you are unable to convince HMRC with the above, then I'm afraid the whole gain would be chargeable to capital gains tax. You will have your gains allowance against it and the balance will be taxed at CGT rate of 18%, 28% or a combination of both depending on your taxable income in the year of sale.
I hope this is helpful and answers your question.
If you have any other questions, please ask me before you rate my service – I’ll be happy to respond.