The third benefit of the War Caster feat (PHB, p. 170) allows you to cast a spell when an enemy provokes an opportunity attack from you. The spell must target only the provoking creature, and can only have a casting time of 1 action.
For the sake of abilities like the first benefit of Sentinel (which causes opportunity attacks to reduce a creature's speed to 0), does my spell cast using the third benefit of War Caster still count if it uses an attack?