Cannot be submitted as a comment. Your question should be adjusted in view of the output of the Maple 2017.3 command

    dsolve(z*(z-1)*((D@@2)(w))(z)+(2*z-1)*(D(w))(z)+2*w(z) = 0);

$$w \left( z \right) ={\it \_C1}\,
{\mbox{$_2$F$_1$}(1/2-i/2\sqrt {7},1/2-i/2\sqrt {7};\,-i\sqrt {7}+1;\,{z}^{-1})}
{z}^{-1/2+i/2\sqrt {7}}+{\it \_C2}\,
{\mbox{$_2$F$_1$}(1/2+i/2\sqrt {7},1/2+i/2\sqrt {7};\,i\sqrt {7}+1;\,{z}^{-1})}
{z}^{-1/2-i/2\sqrt {7}}
 $$