A model-dependent amplitude analysis of the decay B0→D(KS0π+π−)K∗0 is performed using proton-proton collision data corresponding to an integrated luminosity of 3.0fb−1, recorded at s=7 and 8TeV by the LHCb experiment. The CP violation observables x± and y±, sensitive to the CKM angle γ, are measured to be \begin{eqnarray*} x_- &=& -0.15 \pm 0.14 \pm 0.03 \pm 0.01, y_- &=& 0.25 \pm 0.15 \pm 0.06 \pm 0.01, x_+ &=& 0.05 \pm 0.24 \pm 0.04 \pm 0.01, y_+ &=& -0.65^{+0.24}_{-0.23} \pm 0.08 \pm 0.01, \end{eqnarray*} where the first uncertainties are statistical, the second systematic and the third arise from the uncertainty on the D→KS0π+π− amplitude model. These are the most precise measurements of these observables. They correspond to γ=(80−22+21)∘ and rB0=0.39±0.13, where rB0 is the magnitude of the ratio of the suppressed and favoured B0→DK+π− decay amplitudes, in a Kπ mass region of ±50MeV around the K∗(892)0 mass and for an absolute value of the cosine of the K∗0 decay angle larger than 0.4.