The manual says: Wing flaps -- as desired!
Well... the flight manual will say a little more than that, how much more depending upon the year of the 172.
Referring to the flight manual for a 172S (the more recent, and more rigorous):
In section 2, Limitations: Approved Takeoff Range - 0 to 10, Approved Landing range - 0 to 30. And, there are speed limitations for flaps. It actually
is the law that you fly the aircraft within its limitations.
Section 3, Emergency Procedures, has a number of references to specific flap position for emergency situations.
Section 4, Normal Procedures, mentions flap position in several places, and has a paragraph devoted to flap settings.
And, Section 5, Performance, has many references to flap position, as it relates to performance (how much runway you're going to need).
So yes, the 172 has a lot of freedom as to the flap position you may select, and advice on how much for when - but it's not open ended, so you have to read and understand the flight manual to know.