On the Wikipedia page for the quadratic Gauss sum it states that it will evaluate to $0$ in the case that $\text{gcd}(a,c)>1$, except when $l|b$.
The Gauss sum is defined as
$$G(a,b,c)=\sum_{n=0}^{c-1} e^{2\pi i\frac{an^2+bn}{c}}$$
Lets say that $\text{gcd}(a,c)=l>1$. Then we could write $a=a'l$ and $c=c'l$ such that
$$G(a,b,c)=\sum_{n=0}^{c-1} e^{2\pi i\frac{a'ln^2+bn}{c'l}}=\sum_{n=0}^{c-1} e^{2\pi i\frac{a'n^2}{c'}}e^{2\pi i\frac{bn}{c'l}}$$
How can this be utilised to show that $G(a,b,c)=0$, except when $l|b$?
$G(a,b,c) = \sum_{n=0}^{c-1} \exp\left( 2\pi i \frac{an^2+bn}{c}\right)$; Note that the summand $f(a, b, c; n) = \exp\left( 2\pi i \frac{an^2+bn}{c} \right)$ satisfies $f(a,b,c;n) = f(a,b,c;n+c)$, so we can shift the index to have
$$G(a,b,c) = \sum_{n=0}^{c-1}\exp\left( 2\pi i \frac{a(n+r)^2+b(n+r)}{c}\right)$$ for any integer $r$.
Let $a = \ell A$ and $c = \ell C$; let $r = C$ to have $G(a,b,c) = G(a,b,c) \cdot e^{2\pi i \frac{b}{l}}$. If $\ell \not \mid b$ , $e^{2\pi i \frac{b}{\ell}} \ne1$ and so $G(a,b,c) = 0$. Here $\ell$ is the gcd of $a$ and $c$.