Keller's Learn to Read Latin says quam is a relative adjective or an interrogative adjective:
The quam of the adverb quam ob rem may be either a relative adjective [see §86)-“on account of which thing," "therefore”—or an interrogative adjective [see §88), “on account of which thing,” “why.” Quam ob rem may be written as a single word (quamobrem).
Oxford Latin Dictionary says quam is an interr. and rel. adv.:
quam interr. and rel. adv. [acc. sg. f. of *quo- (QVIS1); = Osc. pan]
Which one is correct?
By the way, rem doesn't appear in the dictionary. What does it mean?