FOR A NEATLY instructive example of a public policy dilemma, you could hardly do better than the fierce political struggle over rail rates for coal. Coal and oil are competing fuels. The faster prices rise for oil, the greater the cost advantage for coal. How much of that advantage should the railroads be permitted to preempt by raising their rates for delivering the coal to the power plant?

If you are worried about the oil crisis and want to push the power plants as hard as possible to switch from oil to coal, you will want to keep coal much cheaper. That will give the power plants a strong incentive to move to coal. But if you are worried about the railroad crisis - the deterioration of the system and its financial anemia - you will want to keep raising freight rates for coal. You will want to keep coal only slightly cheaper than oil or perhaps no cheaper at all. The federal agency that sets the long haul freight rates is the Interstate Commerce Commission, and it is deeply concerned about the future of the railroads.

The city of San Antonio, Tex., runs its own municipally owned electric utility. It converted the generators from oil and gas to coal, just as national energy policy urged. But since last December, the city bitterly observes, freight rates for delivering Wyoming coal to San Antonio have risen from $12.42 to $18.18. That's a faster run-up than OPEC's oil prices.

The ICC sees the national swing to coal as the salvation of the American railroads. The mines are far from the cities and, unlike most other kinds of freight, coal is hard to move by highway. The ICC holds down rates on the types of freight for which trucks can complete, but there's no such limit for coal.

The President's Commission on Coal has been holding hearings on the reasons for the country's extremely slow progress in switching its power plants to coal. Testifying before it, Daniel O'Neal, the chairman of the ICC, readily acknowledged that two federal policies collide here. ". . . In these coal cases," he said, "we frequently have the Department of Transportation coming in and arguing the case that the railroads need this revenue and the [ICC] ought to let the rates go to very high levels. On the other hand, in a coal case you will have the Department of Energy coming in and saying the opposite. So the signals are not particularly clear." So far the winners have mainly been the railroads, and that's an important part of the explanation for the lag in coal conversion. When federal agencies work at cross purposes, only the White House can clarify the signals. You would think someone over there would.