Selective COX-2 inhibitors are used as an alternative to NSAIDs to prevent further damage to the stomach lining as they may have a lower risk of gastrointestinal side effects.