The $K_\mathrm{a}$ for $\ce{HCN}$ is $6.17 \cdot 10^{-10}$ with a $\mathrm{p}K_\mathrm{a}$ of $9.21$
Thus, the cyanide ion is a strong base.
Also, the cyanide ion is a good nucleophile.
So in the reaction of alkyl halides with $\ce{KCN}$, a mixture of products must be formed depending on the solvent and alkyl group.
However my text suggests that the reaction proceeds only via $\mathrm{S_N2}$.
Shouldn't the product formed depend on the alkyl group, say for a tertiary alkyl group, the reaction can go via $\mathrm{S_N1}$ mechanism for polar protic solvents and via $\mathrm{E2}$ for polar aprotic solvents and as the cyanide ion is strong base, the reaction is unlikely to go via $\mathrm{E1}$ and due to steric factors $\mathrm{S_N2}$ is also ruled out.
Also is there any difference if we use $\ce{KCN}$ or alcoholic $\ce{KCN}$?