Relative and interrogative pronouns

The relative pronoun introduces a clause referring back to an antecedent. It agrees with its antecedent in gender and number, but its case is determined by its role within the relative clause.

Qui, quae, quod — who, which

CaseMasc. sg.Fem. sg.Neut. sg.Masc. pl.Fem. pl.Neut. pl.
Nom.quiquaequodquiquaequae
Gen.cuiuscuiuscuiusquorumquarumquorum
Dat.cuicuicuiquibusquibusquibus
Acc.quemquamquodquosquasquae
Abl.quoquaquoquibusquibusquibus

Puella, quam vidi, cantabat. — The girl, whom I saw, was singing. Quam is feminine singular like puella, but accusative because it is the object of vidi.

Interrogative pronouns and adjectives

FunctionMasc.Fem.Neut.
Pronoun nominative singularquisquisquid
Pronoun accusative singularquemquemquid
Interrogative adjective nominative singularquiquaequod
Genitive singular (both)cuiuscuiuscuius
Dative singular (both)cuicuicui

Quis venit? — Who is coming? Quid vides? — What do you see? Qui puer venit? — Which boy is coming? Other case forms generally follow qui, quae, quod.

Do not confuse quis? (who?) with qui (who/which, relative; or which?, interrogative adjective).