Versatile electronic properties of atomically layered ScO2