I am working with stored procedures in SQL Server for the first time. Below is the existing stored procedure I have:

```
USE [Hello]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Profile] 
    (@Culture AS VARCHAR(10))
AS
BEGIN
    SELECT 
        lt.ID AS TypeId,
        ltt.Title AS TypeTitle
    FROM 
        Hello..lkpLocationType lt
    INNER JOIN 
        Hello..TypeText ltt ON ltt.TypeId = lt.ID
                            AND ltt.Culture = @Culture
    WHERE  
        lt.IsActive = 1                    
END

```

Now I want to add one more condition here so I need to have `if` and `else` condition here. 

* If there is a `licenseId` and its value is `9` then return three values directly as `A`, `B` and `C`
* Otherwise execute the current sql I have which joins two table and return basis on culture value and if it is active.

Is this possible to do directly in stored procedure by hardcoding these three values `A`, `B` and `C` and return if `licenseId` value is `9`? So looks like I need to modify this alter procedure and licenseId as well? Am I right?

```
ALTER PROCEDURE [dbo].[Profile] 
    (@Culture AS VARCHAR(10)
     @LicenseId AS INT)

```

If this is not possible to do then I can execute another SQL if `licenseId` value is 9 which can return `A`, `B` and `C`?

**Update:**
That makes sense now. There is one thing I am confuse now. My VB code is executing this stored procedure and after that it is iterating the values returned by my existing original SQL by extracting value of two columns `TypeTitle` and `TypeID`.

```
Dim dtLocationTypes As DataTable = dalClientProfile.Profile(Session("Culture"), Session("LicenseID"))
If dtLocationTypes.Rows.Count > 0 Then
    ddlLocationType.DataSource = dtLocationTypes
    ddlLocationType.DataTextField = "TypeTitle"
    ddlLocationType.DataValueField = "TypeID"
    ddlLocationType.DataBind()
End If

```

Above code was working fine before but when I added `LicenseID` so it is executing the If block now in the stored procedure but since we dont have these two columns now in the returnd result so I believe it is not able to extract value from them. Is there any way we can modify stored procedure for that `If condition` so that while iterating it works fine in the VB code?

In general this is the output for SQL which is in ELSE block and that's how my VB code is able to extract it.

```
TypeID  TypeTitle
-----------------
1       Hello
2       World
3       PQR

```

Now for the SQL which is in IF block, I want to return something like this directly in stored procedure if possible?

```
TypeID  TypeTitle
-----------------
1       A
2       B
3       C

```