At least 12 people have died and more than 600,000 households have been affected by the worst flooding in southern Thailand in decades, according to a government agency.