Remark 1: If $p$ is a prime $p|n$ then $p-1|12$. This shows that the only primes which could divide $n$ are $\{ 2, 3, 5, 7, 13 \}$.
Remark 2: If $p^2|n$ then $p(p-1)|12$. This shows that $5^2 \nmid n, 7^2 \nmid n$ and $13^2 \nmid n$.
Now we go systematically through all prime factors , starting from the biggest.
Case 1: $13|n$. Then $n=13m$ with $13 \nmid m$. Then
$$12=\phi(13m)=\phi(13) \phi(m)=12 \phi (m) \Rightarrow \phi(m)=1 \,.$$
There are only $2$ values $m$ can take.
Case 2: $7|n, 13 \nmid m$. Then $n=7m$ with $7 \nmid m$. Then
$$12=\phi(7m)=\phi(7) \phi(m)=6 \phi (m) \Rightarrow \phi(m)=2 \,.$$
There are only $3$ values $m$ can take.
Case 3: $5|n, 7 \nmid m, 13 \nmid m$. Then $n=5m$ with $5 \nmid m$. Then
$$12=\phi(5m)=\phi(5) \phi(m)=4 \phi (m) \Rightarrow \phi(m)=3 \,.$$
But this is not possible (why?)
Case 4: $5\nmid n, 7 \nmid m, 13 \nmid m$. Then
$$n=2^a3^b$$
Now break the problem in three subcases, eacn being easy to solve:
Subcase 1: $a=0$. In this case $n=3^b$ and
$$12= \phi(3^b)=2\cdot 3^{b-1} \,.$$
no solution.
Subcase 2: $b=0$. In this case $n=2^a$ and
$$12= \phi(2^a)= 2^{a-1} \,.$$
no solution.
Subcase 3: $a\neq 0, b\neq 0$. In this case
$$12= \phi(2^a3^b)=2\cdot 2^{a-1}3^{b-1} \,.$$
There is one solution in this case..