• You need to put your return statement in an IF, not in a SELECT. Example:

    IF @isExist = 'No'

    RETURN;