Recall: Let us recall two useful result to solve this kind of exercise.

1. A system of equation $Ax=b$ has a solution if and only if $b$ can be written as a linear combination of columns of $A$.

2. A system of equation $Ax=b$, $b\neq 0$ has a unique solution if and only if $A$ is invertible.

Let $A$ be the given matrix and $b$ be the given vector. Note that

$$A= \left(\begin{array}{llc}1 & 2 & 4 \\ 2 & 1 & 2 \\ 1 & 2 & (a-4)\end{array}\right)\quad \text{and}\quad b = \left(\begin{array}{l}6 \\ 4 \\ a\end{array}\right)$$

Note that we can very easily calculate the determinant of $A$ by applying elementary column/row operation. Basically, our idea is to convert the given matrix into a lower triangular matrix by using elementary column operation. Then by multiplying all its diagonal entries we can find the determinant.

Note that

$$A= \left(\begin{array}{llc}1 & 2 & 4 \\ 2 & 1 & 2 \\ 1 & 2 & (a-4)\end{array}\right)\xrightarrow{C_3\leftarrow C_3-2C_2} \begin{pmatrix} 1 & 2 & 0 \\ 2 & 1 & 0 \\ 1 & 2 & (a-8) \end{pmatrix} \xrightarrow{C_2\leftarrow C_2-2C_1} \begin{pmatrix} 1 & 0 & 0 \\ 2 & -3 & 0 \\ 1 & 0 & (a-8) \end{pmatrix}$$

It follows that

$$\det A= 1\times (-3)\times (a-8) $$

To have a unique solution to the given system we must need $\det A\neq 0$, that means,

$$a-8\neq 0\implies a\neq 8.$$

Therefore, the correct answer is **D**.