For a set of quantum numbers to be valid, the following conditions must hold:
- \( n \) is the principal quantum number and can take positive integer values: \( n = 1, 2, 3, \dots \).
- \( l \) is the azimuthal quantum number and can take values from \( 0 \) to \( n - 1 \).
- \( m_l \) is the magnetic quantum number and can take integer values from \( -l \) to \( l \).
- \( m_s \) is the spin quantum number and can be \( +\frac{1}{2} \) or \( -\frac{1}{2} \).
In option (D), the set of quantum numbers satisfies all the conditions:
- \( n = 3 \),
- \( l = 2 \),
- \( m_l = -2 \), and
- \( m_s = \frac{1}{2} \).
Thus, the correct answer is (D).