We report an investigation of the structure of $^{12}$C nucleus employing a newly developed configuration-mixing method. In the three-dimensional coordinate-space representation, we generate a number of Slater determinants with various correlated structures using the imaginary-time algorithm. We then diagonalize a many-body Hamiltonian with the Skyrme interaction in the space spanned by the Slater determinants with parity and angular momentum projections. Our calculation reasonably describes the ground and excited states of $^{12}$C nucleus, both for shell-model-like and cluster-like states. The excitation energies and transition strengths of the ground-state rotational band are well reproduced. Negative parity excited states, $1_1^-$, $2_1^-$, and $3_1^-$, are also reasonably described. The second and third $0^+$ states, $0_2^+$ and $0_3^+$, appear at around 8.8 MeV and 15 MeV, respectively. The $0_2^+$ state shows a structure consistent with former results of the alpha-cluster models, however, the calculated radius of the $0_2^+$ state is smaller than those calculations. The three-{alpha} linear-chain configuration dominates in the $0_3^+$ state.