Here is an illustration of what I think you're talking about. If my assumptions are wrong, please change the code up to illustrate generally what your tables and data look like, and what you would expect the results to look like given the sample data you supply.
declare @descriptions table (code int identity primary key, code_description varchar (50))
insert into @descriptions
select 'small' union all
select 'medium' union all
select 'large' union all
select 'red' union all
select 'green' union all
select 'blue' union all
select 'stock' union all
select 'custom'
select * from @descriptions
declare @items table (itemNumber int , code int )
insert into @items
select 1,3 union all
select 1,6 union all
select 1,7
-- one join gets the descriptions
select itemnumber, i.code, d1.code_description, row_number() over(order by (select Null)) as rowID
from @items i
join @descriptions d1 on d1.code = i.code
where itemNumber = 1
-- this code cross-tabs the rows into columns
;with cte as (
select itemnumber, i.code, d1.code_description, row_number() over(order by (select Null)) as rowID
from @items i
join @descriptions d1 on d1.code = i.code
where itemNumber = 1
)
select itemnumber
, max(case when rowID = 1 then code_description else null end) as Col1
, max(case when rowID = 2 then code_description else null end) as Col2
, max(case when rowID = 3 then code_description else null end) as Col3
from cte
group by itemnumber
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills