"Well, I'd be happy to answer that question, but what I'd rather talk about is the skills that I have that I can bring to this position. Since you're hiring me to be a web developer, lets talk about that. For example, last year I developed a web application using xxxxxxxx"...
That would have been a much better answer. In my experience, the interviewer is mostly trying to get you to talk. In this case, he's trying to guage your level of competence. If you understand that up front, you can take over the conversation and lead the conversation where you want it to go; addressing your skills, and still address his needs.
Also, I've come to learn that even in a large tech community (I'm in Minneapolis) its a small world. If you piss off someone who is in a hiring position, word will get around, and it will be that much harder to get another interview somewhere else.
A better way to handle this would have been to say "After learning about this position and this company during this interview, I've decided that this company would not be a good fit for me. I'm more interested in doing XXX and I'm looking for those opportunities". A truthful statement; and you've saved the interviewer some time, because now he can move on to the next candidate without spending any more time considering you for the position.
Even better would be to leave the interview with something like the following: Now that I know the kind of person you're looking for, if I know someone like that I'll be sure to have him apply. In the meantime, if you hear of a company with an opening doing XXX, could you let me know?