Given two random variables Y and Z, I want to show that
$$ Var(Y|Z) = 0 $$
if and only if there exists a measurable function $h$ such that
$$ Y = h(Z).$$
From $Var(Y|Z) = 0$ I know that $E[Y^2|Z] = E[Y|Z]^2$, but I don't know what to make of this or how to continue from here.