You can also use FORMAT() function introduced in SQL Server 2012. http://technet.microsoft.com/library/hh213505.aspx
DECLARE @number1 INT, @number2 INT
SET @number1 = 1
SET @number2 = 867
SELECT FORMAT(@number1, 'd10')
SELECT FORMAT(@number2, 'd10')