Whoever is convicted of a crime punishable wholly or in part by imprisonment in jail may be sentenced to such imprisonment in the house of correction or to confinement at hard labor either in the jail or house of correction; and if convicted of a crime punishable by imprisonment in the house of correction may be sentenced to such imprisonment in a jail.
Mass. Gen. Laws ch. 279, § 6