BASS-XXIII: a new mid-infrared diagnostic for absorption in AGN