In Chapter 7, the Bankruptcy Trustee will take any property that has equity and is not protected by an exemption under your local laws.
In Chapter 13, you will pay the value of any property that has equity and is not protected by an exemption to your Trustee over a 3 - 5 year period of time.
Hope this helps!
If the building is not protected by an exemption the equity you have will either have to be surrendered (chapter 7) or repaid through a Plan in Chapter 13.
REQUEST: Please give this answer a "thumbs up"(below) if you find it valuable.
Disclaimer: This answer does not constitute legal advice. I am admitted in the States of New York, New Jersey and Massachusetts only and make no attempt to opine on matters of law that are not relevant to those three States. This advice is based on general principles of law that may or may not relate to your specific situation. Facts and laws change and these possible changes will affect the advice provided here. Consult an attorney in your locale before you act on any of this advice. You should not rely on this advice alone and nothing in these communications creates an attorney client relationship. The opinions expressed herein are those of the author only and the fact that he has worked as an Assistant District Attorney; State Supreme Court Clerk; Special Assistant United States Attorney (Hawaii); Assistant Cornell University Counsel or Judge Advocate, United States Marine Corps should not be relied upon to assume that these statements reflect the policy of these organizations.