Only if you already had the money equivalent in the first place. Whatever you used as collateral will be something the other side would have gladly bought for the same amount. It's a speculative transaction between you and the other side that is completely unrelated to the house.
In real life, the collateral for the loan you use to buy a house is that house itself, something you did not own before (and arguably not before you are done paying back to mortgage).