Chemically controlled unfolding of a RNA-like polymer model