In a large saucepan, melt butter or margarine. Stir in flour and garlic powder. Add milk all at once. Cook and stir over medium heat until thickened and bubbly. Stir in cheeses. Cook and stir over low heat until melted.
Stir in corn and ham. Transfer mixture to a 2-quart casserole. Bake in a 350 degree F oven about 45 minutes or until heated through. Makes 10 to 12 side-dish servings.