Terry Pratchett
Book 9 of Discworld
Eric calls up a demon to grant him three wishes - but what he gets is the Discworld's most incompetent wizard ...