Step 1: Concept
The solubility product constant ($K_{sp}$) is calculated from the molar concentrations of ions in a saturated solution.
Step 2: Meaning
pH 12 means pOH = $14 - 12 = 2$. Therefore, $[\text{OH}^-] = 10^{-2} \text{ M}$.
Step 3: Analysis
For $\text{Ba(OH)}_2 \rightarrow \text{Ba}^{2+} + 2\text{OH}^-$, if $[\text{OH}^-] = 10^{-2} \text{ M}$, then $[\text{Ba}^{2+}] = \frac{1}{2} \times 10^{-2} = 5 \times 10^{-3} \text{ M}$.
$K_{sp} = [\text{Ba}^{2+}][\text{OH}^-]^2 = (5 \times 10^{-3})(10^{-2})^2$.
Step 4: Conclusion
$K_{sp} = 5 \times 10^{-3} \times 10^{-4} = 5 \times 10^{-7}$.
Final Answer: (D)