The penalties for drug possession vary from state to state. In some states, possession of small quantities for personal use is a misdemeanor. In others, especially when it comes to cocaine, it remains a felony. However, prison is unlikely for a first time drug offense involving such a small quantity of cocaine.
Prison is not the only consideration when it comes to deciding whether to plead guilty to a felony. There are many adverse consequences to having a felony on your record, from difficulty to getting a job or professional license to losing your right to vote and possess a firearm or ammunition, to immigration consequences if you are not a U.S. citizen. Unless the state in which you are charged allows for complete expungement, these consequences can be permanent. Even a misdemeanor record can have adverse consequences, especially in the employment sector. It can also prevent you from obtaining a student loan.
While prison is unlikely, some states allow for the imposition of county jail time as a condition of probation. You may also face a fine.
Most states now allow for deferred adjudication or sentencing for possession of small amounts of drugs. Under these arrangements, which also differ from state to state, you may be placed under the supervision of the court or probation department, and if you stay out of trouble for a set period of time, complete drug classes and pass periodic drug tests, you can avoid having a permanent conviction on your record.
It may seem less expensive and like less of a hassle to plead guilty if you aren't facing prison. But you should also consider the long-term consequences, and I recommend you consult an experienced attorney in your area with whom you can discuss the facts specific to your case. You may have a viable defense to the charge - perhaps the drug was seized as the result of an unlawful search. Even if that's not the case, an experienced attorney may be able to negotiate a deferred sentencing arrangement for you, if that's allowed in your state, so that you neither go to jail nor have a permanent conviction on your record.