The chemical responsible for the health benefits of garlic, allicin, is deactivated during cooking so garlic should be eaten raw when taken for medicinal purposes.
These include allicin from garlic and onions, beta-carotene and vitamin C from dark green leafy vegetables and broccoli, and vitamin E from nuts and seeds.