PATINDEX returns the start position of pattern occurrence in an expression.
Warning! If pattern or expression is NULL, PATINDEX returns NULL.
Example
SELECT 'This is PATINDEX example' AS 'Expression'
SELECT PATINDEX('%pat%', 'This is PATINDEX example') as 'Find any position pat';
SELECT PATINDEX('%a_p%', 'This is PATINDEX example') as 'Find any a followed by any caracter and then p';