Once the consulate has convinced itself that you can afford to keep yourself housed and fed during your visit, nobody cares much what you actually do. Minor changes in plans, such as exactly where you will sleep, are routine and perfectly allowed.
It would probably be better to have been more honest in the application and say something like "I hope to be able to stay with my friend So-And-So, but in case that doesn't work out, plan B is such-and-such hotel, and you can see I'm budgeting to have that as an option." But really, what they're interested in is just whether the story you tell makes more rational and economic sense than the mandatory alternative hypothesis "I'm hoping I can find illicit work in Europe since my long-term economic situation at home is hopeless". If you have demonstrated that you're someone who can spend the cost of a hotel stay without squandering your life savings to a degree that a genuine tourist wouldn't, nobody cares if you actually do that.
In particular, once you're in, all you will really be held to is leaving again by roughly the time you said you would (and in any case before your visa expires).