Drain liquid from corn. Heat butter in a heavy skillet over medium heat until melted. Add corn, garlic, and salt. Cook until corn starts to brown slightly, stirring and scraping bottom of pan to prevent sticking and burning. Lower heat; stir in red pepper flakes and 2 tablespoons water or corn liquid. Cover and simmer 3 to 4 minutes.