Lequel is usually a pronoun, but it can also be a relative adjective. Relative adjectives are placed in front of nouns to indicate a link between that noun and an antecedent (the same noun previously stated or implied). In both English and French, relative adjectives are used mainly in legal, administrative, or other highly-formal language.
The basic French relative adjective, lequel, has to agree in gender and number with the noun it modifies. In addition, it contracts with the prepositions à and de. You can see all of these forms in the table on page 1.
Il y a cinq témoins, lesquels témoins vont arriver demain.
There are five witnesses, which witnesses will arrive tomorrow.
Vous payerez 500 $, laquelle somme sera...
You will pay $500, which sum will be...
Il est possible que le défendeur tue encore, auquel cas...
It's possible that the defendent will kill again, in which case...
Clarification:
Q. What's the difference between lequel as a relative adjective and lequel as a relative pronoun?
A. The same as the difference between any adjective and pronoun:
The relative adjective precedes a noun: laquelle somme sera...
The relative pronoun replaces a noun: - Avez-vous la clé ? - Laquelle ?

