The plaintiff in such case, if judgment is rendered for him may, at any time during the same term, or before judgment or decree is rendered on the assessment of the value of the improvements, in person or by his attorney in the cause, enter on the record his election to relinquish his estate in the premises to the defendant at the value so ascertained, and the defendant shall thenceforth hold all the estate that the plaintiff had therein at the commencement of the suit, provided he pay therefor such value, with interest, in the manner in which the court may order it to be paid.