different background for every page (wordpress)

I need to use a different background image for every page of my website. I've got it set up in a way that that I could add a new template for each page and add the code there where it would work. However, I don't want to do that and to link them up in the admin because I've got like 100 pages of this site.

Could I or should I use a switch statement to detect the pagename in a query_posts function and somehow use that?

Thoughts?