I would like to solve the following system of equation in terms of g3

The following code returns one possible solution.
syms g0 g1 g2 g3 x mu3 mu4 mu5 mu6 gamma
A = [1, 0, 1, mu3; 0, 1, mu3, mu4; 1, mu3, mu4, mu5];
B = [0; 0; gamma];
X = linsolve(A,B);
But I would like to have a solution for g0, g1 and g2 in terms of g3.
How can I specify that?
Transform your problem into the following equivalent formulation under the form of a square system :
$$\begin{pmatrix}1&0&1\\0&1&\mu_3\\1&\mu_3&\mu_4\end{pmatrix}\begin{pmatrix}g_0\\g_1\\g_2\end{pmatrix}=\begin{pmatrix}-\mu_3g_3\\-\mu_4g_3\\\gamma-\mu_5g_3\\\end{pmatrix}$$
giving the following Matlab formulation:
giving: