try below query:-
if @currentdate is 2012-08-27
below query returns all the data for year 2012
SELECT DATEPART(MONTH, convert(DATETIME,CreatedDateTime,13)) AS [Month of Year],
Id AS [TotalShipOrders]
FROM ShipmentDetail
WHERE datepart(year,CreatedDateTime)=datepart(year,@CurrentDate) UNION ALL
SELECT Month, NULL
FROM @Months