I may be able to offer a set of ugly abominations of dirty solutions here, for which I will probably get bashed from more advanced users ^_^. So take them only as last resort.
If too long means too wide and too wide means slightly too wide, then you may do something like
\documentclass{article}%
\usepackage{graphicx}
\begin{document}%
%
\resizebox{\columnwidth}{!}{\parbox{1.125\columnwidth}{%
\begin{equation}%
1+2+3+4+5+5+6+7+8+9+9+0+4+5+2+2+4+5+6+7+8+8+5+3++2+1+3+5
\end{equation}%
}}%
%
\end{document}%
For this, you need to experiment a bit to get the right width for the \parbox. Of course, this will also scale the equation number. If this does not look good for you, you may try instead
\documentclass{article}%
\usepackage{graphicx}
\begin{document}%
%
\begin{equation}%
\resizebox{0.6\columnwidth}{!}{\parbox{1.1\columnwidth}{\ensuremath{\displaystyle{%
1+2+3+4+5+5+6+7+8+9+9+0+4+5+2+2+4+5+6+7+8+8+5+3++2+1+3+5%
}}}}%
\end{equation}%
%
\end{document}%
which does not scale the equation number (but you now need to find two acceptable widths, for \resizebox and for \parbox).
If **too long* means too long vertically, then there seems to be a solution for automated page breaking if you use the align environment together with \allowdisplaybreaks, as outlined in LaTeX equation is always on one page.
Additionally, instead of splitting the equation, you may also put it into a \figure environment and let it float. This way, you can keep it together and you can still reference it from the text. Of course, this introduces a variety of other issues, e.g., it may float before the reference to it, so this might not be applicable. Anyway, here an example:
\documentclass{article}%
\usepackage{lipsum}
\begin{document}%
%
\lipsum[2-5]%
%
Here is where the equation~\ref{eq} should be.
\begin{figure}%
\begin{equation}%
A=\left\{\begin{array}{ll}%
1&\textrm{if }B=5\\%
2&\textrm{if }B=2\\%
3&\textrm{if }B=3\\%
4&\textrm{if }B=4\\%
5&\textrm{if }B=1\\%
6&\textrm{if }B=6\\%
7&\textrm{if }B=7\\%
8&\textrm{if }B=334\\%
9&\textrm{if }B=77\\%
x&\textrm{if }B=64\\%
y&\textrm{if }B=34\\%
z&\textrm{if }B=45\\%
a&\textrm{if }B=456\\%
b&\textrm{if }B=774\\%
c&\textrm{if }B=44\\%
\end{array}\right.%
\label{eq}%
\end{equation}%
\end{figure}%
%
\lipsum%
%
\end{document}%
A similar effect might be achieved with the \afterpage package, which avoids the danger of equations floating before their reference but will always put them on the next page:
\documentclass{article}%
\usepackage{afterpage}%
\usepackage{lipsum}%
\begin{document}%
%
\lipsum[2-5]%
%
Here is where the equation~\ref{eq} should be.
\afterpage{%
\begin{equation}%
A=\left\{\begin{array}{ll}%
1&\textrm{if }B=5\\%
2&\textrm{if }B=2\\%
3&\textrm{if }B=3\\%
4&\textrm{if }B=4\\%
5&\textrm{if }B=1\\%
6&\textrm{if }B=6\\%
7&\textrm{if }B=7\\%
8&\textrm{if }B=334\\%
9&\textrm{if }B=77\\%
x&\textrm{if }B=64\\%
y&\textrm{if }B=34\\%
z&\textrm{if }B=45\\%
a&\textrm{if }B=456\\%
b&\textrm{if }B=774\\%
c&\textrm{if }B=44\\%
\end{array}\right.%
\label{eq}%
\end{equation}%
}%
%
\lipsum%
%
\end{document}%
Finally, if you are in a two-column document and your equation is too wide for one column, you may also consider putting it into a figure* environment (which enables you to use the full page width). Alternatively, you may use the cuted package's strip environment to get the full page width - and you may again put it into \afterpage to move the equation to the top of the next page.