A recent theoretical study [Phys. Rev. B 85, 121411(R) (2012)] predicted a thickness limit below which ideal polar cuprates turn nonpolar driven by the associated electrostatic instability. Here we demonstrate this possibility by inducing a structural transformation from the bulk planar to chainlike structure upon reducing the SrCuO2 repeat thickness in SrCuO2/SrTiO3 superlattices with unit-cell precision. Our results, based on structural investigation by x-ray diffraction and high resolution scanning transmission electron microscopy, demonstrate that the oxygen sublattice can essentially be built by design. In addition, the electronic structure of the chainlike structure, as studied by x-ray absorption spectroscopy, shows the signature for preferential hole occupation in the Cu 3d(3z2-r2) orbital, which is different from the planar case.