IF statement in MSSQL Stored Procedure
I am trying to create a stored procedure that takes a bit parameter which if true orders by one column and if false orders by another column. How would I implement this? 

Here is what I have so far

    CREATE PROCEDURE [dbo].[CLICK10_GetCP]
    	@switch AS BIT
    AS
    	BEGIN
    		SELECT
    			acct_nbr,
    			acct_name
    		FROM
    			acct
    		ORDER BY 
    		
    	END
    GO


IF statement in MSSQL Stored Procedure
===

I am trying to create a stored procedure that takes a bit parameter which if true orders by one column and if false orders by another column. How would I implement this? 

Here is what I have so far

    CREATE PROCEDURE [dbo].[CLICK10_GetCP]
    	@switch AS BIT
    AS
    	BEGIN
    		SELECT
    			acct_nbr,
    			acct_name
    		FROM
    			acct
    		ORDER BY 
    		
    	END
    GO

