Three people were taken to hospital following a "chemical incident" at a school in County Londonderry .