The court shall render such judgment in all cases as shall be just to all the parties, and properly protect their respective interests, and may adjudge the recovery of an indebtedness, the conveyance, transfer, or delivery to the sheriff, or any officer appointed by the judgment, of any real estate or personal property disclosed or found to be liable to be applied to the plaintiff's demand, or by the judgment pass the title thereto; and may therein or by its order, when proper, direct the manner of making sale and disposing of the proceeds thereof, or of any money or other thing paid over or delivered to the clerk or officer.
SDCL 21-18-47