Step 1: Use the formula for apparent depth.
For a liquid,
\[
\mu=\frac{\text{real depth}}{\text{apparent depth}}
\]
Given real depth of water tank is
\[
12\,\text{cm}
\]
Apparent depth in water is
\[
9\,\text{cm}
\]
Step 2: Find apparent depth in the new liquid.
For the new liquid,
\[
\mu=1.5
\]
So,
\[
\text{apparent depth}=\frac{\text{real depth}}{\mu}
\]
\[
=\frac{12}{1.5}
\]
\[
=8\,\text{cm}
\]
Step 3: Find the shift in microscope position.
Initially, the microscope focuses the needle at apparent depth
\[
9\,\text{cm}
\]
After replacing water by liquid, the apparent depth becomes
\[
8\,\text{cm}
\]
Therefore, the microscope has to be moved through
\[
9-8=1\,\text{cm}
\]
Step 4: Final conclusion.
Hence, the distance through which the microscope has to be moved is
\[
\boxed{1\,\text{cm}}
\]