Can One assign something with EXISTS within the query. Presently it's giving me error Incorrect syntax near '='. However when I uses this question only it runs not surprisingly.

IF EXISTS (SELECT @PK_LOGIN_ID=PK_LOGIN_ID FROM dbo.M_LOGIN 
    WHERE LOGIN_NAME=@LOGIN_NAME AND PASSWORD=@PASSWORD AND FK_ROLE_ID=@FK_ROLE_ID)
            RETURN @PK_LOGIN_ID
    ELSE
            RETURN 0

No, you cannot. You should utilize the code you've published.

You can't assign a flexible within an Is available clause.
One choice is to separate a job and also the check-up or take away the assignment alltogether.

SQL Statement

IF EXISTS (
    SELECT  PK_LOGIN_ID 
    FROM    dbo.M_LOGIN 
    WHERE   LOGIN_NAME=@LOGIN_NAME   
            AND PASSWORD=@PASSWORD 
            AND FK_ROLE_ID=@FK_ROLE_ID)
  SELECT  @PK_LOGIN_ID = PK_LOGIN_ID 
  FROM    dbo.M_LOGIN 
  WHERE   LOGIN_NAME=@LOGIN_NAME   
          AND PASSWORD=@PASSWORD 
          AND FK_ROLE_ID=@FK_ROLE_ID
  ELSE
    SET @PK_LOGIN_ID = 0

RETURN @PK_LOGIN_ID
RETURN  COALESCE(
        (
        SELECT  TOP 1
                PK_LOGIN_ID
        FROM    dbo.M_LOGIN 
        WHERE   LOGIN_NAME = @LOGIN_NAME
                AND PASSWORD = @PASSWORD
                AND FK_ROLE_ID = @FK_ROLE_ID
        ), 0)

You cannot use is available when you are locating data (@PK_LOGIN_ID) so you will have to choose it.

SET @PK_LOGIN_ID = (
    SELECT PK_LOGIN_ID FROM dbo.M_LOGIN 
    WHERE LOGIN_NAME=@LOGIN_NAME AND PASSWORD=@PASSWORD AND FK_ROLE_ID=@FK_ROLE_ID
    )

RETURN ISNULL(@PK_LOGIN_ID, 0)

(This assumes 1 or matching rows only)

IF EXISTS (
    SELECT  PK_LOGIN_ID 
    FROM    dbo.M_LOGIN 
    WHERE   LOGIN_NAME=@LOGIN_NAME   
            AND PASSWORD=@PASSWORD 
            AND FK_ROLE_ID=@FK_ROLE_ID)
  SELECT  @PK_LOGIN_ID = PK_LOGIN_ID 
  FROM    dbo.M_LOGIN 
  WHERE   LOGIN_NAME=@LOGIN_NAME   
          AND PASSWORD=@PASSWORD 
          AND FK_ROLE_ID=@FK_ROLE_ID
  ELSE
    SET @PK_LOGIN_ID = 0

RETURN @PK_LOGIN_ID