From two-dimensional to three-dimensional turbulence through two-dimensional three-component flows