RAG vs. Fine-Tuning: Which Is Best for Enhancing LLMs?