Man sentenced to 12 years in cocaine case