Transformation between spin-Peierls and incommensurate fluctuating phases of Sc-doped TiOCl