Sorting three Decimal values
I don't know how you are using this information, but I think that you could create a very small table variable or temp table with like one column and then sort and select the information in order. 

DECLARE @Table1 TABLE
(
     Dimension VARCHAR(10),
     Size DECIMAL(4,2)
)

INSERT INTO @Table1
(
     Dimension
     , Size
)
VALUES
('Length', @lLength),('Width', @lWidth),('Height',@lHeight)


SELECT * FROM @Table1 ORDER BY Size DESC


This eliminates 3 variables and all if statements (which are not very efficient in RDBMS's)
Setting variables over and over again is not very efficient in a RDBMS.

you can select these into the variables like this

SET @lMax = SELECT TOP (1) FROM @Table1 ORDER BY Size DESC
WITH orderedTable AS
(
    SELECT Size, ROW_NUMBER() OVER (ORDER BY Size) as `RowNumber`
    FROM @Table1
)
SET @lMid = SELECT Size FROM orderedTable WHERE RowNumber = 2; 

WITH orderedTable AS
(
    SELECT Size, ROW_NUMBER() OVER (ORDER BY Size) as `RowNumber`
    FROM @Table1
)
SET @lMin = SELECT Size FROM orderedTable WHERE RowNumber = 3;


I am sure that Phrancis could come up with a better query than this, especially because I call the same CTE twice and I know that it could be more efficient perhaps with a temp table or something.



after seeing what @Phrancis is going to post I came up with something to get rid of the second CTE

because there are only 3 numbers you can subtract the middle number and the largest number to retrieve the minimum number using mathematics, like this

SET @lMax = SELECT TOP (1) FROM @Table1 ORDER BY Size DESC
WITH orderedTable AS
(
    SELECT Size, ROW_NUMBER() OVER (ORDER BY Size) as `RowNumber`
    FROM @Table1
)
SET @lMid = SELECT Size FROM orderedTable WHERE RowNumber = 2; 
SET @lMin = SELECT (SUM(Size) - @lMid - @lMax) FROM @Table1 --Thanks @Phrancis


So the Whole thing looks like this

DECLARE @Table1 TABLE
(
     Dimension VARCHAR(10),
     Size DECIMAL(4,2)
)

INSERT INTO @Table1
(
     Dimension
     , Size
)
VALUES
('Length', @lLength),('Width', @lWidth),('Height',@lHeight)

SET @lMax = SELECT TOP (1) FROM @Table1 ORDER BY Size DESC
WITH orderedTable AS
(
    SELECT Size, ROW_NUMBER() OVER (ORDER BY Size) as `RowNumber`
    FROM @Table1
)
SET @lMid = SELECT Size FROM orderedTable WHERE RowNumber = 2; 
SET @lMin = SELECT (SUM(Size) - @lMid - @lMax) FROM @Table1 --Thanks @Phrancis


I removed SELECT * FROM @Table1 ORDER BY Size DESC because we are filling in the variables in a different way.



If you were using this information in a program or something then I would tell you to just do it there, but it sounds like you are stuck in SQL Server