Very often being convicted, arrested for or even admitting to possession of drugs is one of the fastest ways to get you deported. Drug related crimes are some of the most difficult to defend against in Immigration Court.
However, there are ways that people affected by these crimes can keep their Green Cards. What will decide this is when they were convicted and whether they were advised about immigration effects of pleading guilty to a crime. How long you have had your Green Card can also can effect whether you can escape deportation/removal.
Please contact a licensed Immigration attorney before you act on your specific situation. Immigration Laws and Federal Regulations are constantly changing and the general information provided can change over time.